{# SPDX-FileCopyrightText: © 2015 Siemens AG

   SPDX-License-Identifier: FSFAP
#}

##File

FileName: {{ fileName }}
SPDXID: SPDXRef-item{{ fileId }}
{# FileType: OTHER #}
FileChecksum: SHA1: {{ sha1 | lower }}
FileChecksum: SHA256: {{ sha256 | lower }}
FileChecksum: MD5: {{ md5 | lower }}
{% if fileData.isCleared() %}
{% if fileData.concludedLicenses|default is empty %}
LicenseConcluded: NONE
{% else %}
LicenseConcluded: {{ concludedLicensesString }}
{% endif%}
{% else %}
LicenseConcluded: NOASSERTION
{% endif %}
{% if licenseCommentState %}
{% if fileData.comments is not empty %}
LicenseComments: <text> {{ fileData.comments|join('\n')
  |replace({'<text>':'&lt;text&gt;','</text>':'&lt;/text&gt;'})
  |replace({'\f':''}) }} </text>
{% endif %}
{% endif %}
{% if fileData.scanners|default is empty %}
LicenseInfoInFile: NOASSERTION
{% else %}
{% for res in fileData.scanners %}
{%- set licId=licenseList[res].licenseObj.spdxId %}
{% if licenseList[res].licenseObj.shortName starts with 'LicenseRef-' %}
  {% set licId=licenseList[res].licenseObj.shortName %}
{%- endif ~%}
LicenseInfoInFile: {{ licId|replace({' ':'-'})}}
{% endfor %}
{% endif %}
{# FileSize: 48 Kb (49173 bytes) #}
{% if fileData.copyrights|default is empty %}
FileCopyrightText: NOASSERTION
{% else %}
FileCopyrightText: <text> {{ fileData.copyrights|join('\n')
  |replace({'<text>':'&lt;text&gt;','</text>':'&lt;/text&gt;'})
  |replace({'\f':''}) }} </text>
{% endif %}
{% if fileData.acknowledgements|default is not empty %}
FileAttributionText: <text> {{ fileData.acknowledgements|join('\n')
  |replace({'<text>':'&lt;text&gt;','</text>':'&lt;/text&gt;'})
  |replace({'\f':''}) }} </text>
{% endif %}
